package AbstractTransactions

import (
	"SPC/Model"
)

type ChangeClassificationTransaction struct {
	ChangeEmployeeTransaction
	GetClassification func() Model.PaymentClassification 
	GetSchedule func() Model.PaymentSchedule 
}

func NewChangeClassificationTransaction(empid int)*ChangeClassificationTransaction{
	n := &ChangeClassificationTransaction{
		*NewChangeEmployeeTransaction(empid),
		nil,
		nil,
	}
	n.ChangeEmployeeTransaction.Change = n.Change
	return n
}

func (c *ChangeClassificationTransaction)Change(e Model.Employee){
	pc := c.GetClassification()
	e.SetClassification(pc)
	
	ps := c.GetSchedule()
	e.SetSchedule(ps)
}